﻿using System;
using System.ServiceModel;

namespace PicServer.Services
{
    public class PicService : IPicService
    {
        /// <summary>
        /// 获取图片
        /// </summary>
        /// <param name="imageUnicode"></param>
        /// <returns></returns>
        public Byte[] GetImage(Int64 imageUnicode)
        {
            return BLL.FileService.ReadFile(imageUnicode);
        }

        /// <summary>
        /// 保存图片
        /// </summary>
        /// <param name="fileData"></param>
        /// <returns></returns>
        public Int64 SaveImage(Byte[] fileData)
        {
            return BLL.FileService.SaveFile(fileData);
        }

        /// <summary>
        /// 保存图片
        /// </summary>
        /// <param name="fileData"></param>
        /// <param name="fileDes"></param>
        /// <returns></returns>
        public Int64 SaveImage(Byte[] fileData, String fileDes)
        {
            return BLL.FileService.SaveFile(fileData, fileDes);
        }

    }
}
